package common.db;

import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;

/**
 * Created by Gerardo on 1/26/14.
 */
public class Updater {
	private ConnectionFactory factory;

	private void tryUpdate(final SqlQuery sql) {
		try (Connection connection = factory.create(); Statement statement = connection.createStatement())
		{
			final int result = statement.executeUpdate(sql.toSql());
			notifySuccess(result);
		} catch (SQLException e) {
			e.printStackTrace();
			notifyFailed();
		}
	}

	private void notifySuccess(final int result) {

	}

	private void notifyFailed() {

	}

}
